<extend name="Base/common"/>

<block name="body">

<title>个人中心</title>

	<body style="background:#faf8f8;">

		<div id="perCenter">

			<div class="perHead">

				<img src="__IMG__/images/perback1_02.jpg" class="perBack"/>

				<img src="__IMG__/images/persc_03.jpg"/ class="perscs button-class">

				<neq name="num" value="0"><span class="perNum">{$num}</span></neq>

				<div class="perNews table-tr">

					<img width="132" height="132" src="__ROOT__{$data.logo|getimg=###}"  style="overflow: hidden;display: inline-block; border-radius: 50%;border: 4px solid #a3cbf6;margin-left: 20px;"/>

					<div class="f-fr">

						<h1>{$data.nickname} <?php if(is_vip(session('uid'))){?><img src="__IMG__/images/perV_06.jpg"/><?php }?></h1>

						<p><if condition="$data['sex'] eq 1 "><img src="__IMG__/images/nan_03.png"/ class="f-fl"><else /><img src="__IMG__/images/girl_03.png"/ class="f-fl"></if>

						<span class="f-fl">{$data.age}岁</span><span class="f-fr"><a href="#">个人信息 </a><img src="__IMG__/images/perjt_03.png"/></span></p>

					</div>

				</div>

				<!-- <img src="__IMG__/images/perClas_06.png" class="perClas"/> -->

				<div class="Linka">

				 	<img src="__IMG__/images/perClas_06.png" class="perClas"/>

					<a href="__MODULE__/Collect/collectList"></a>

					<a href="javascript:;" id="mi-course"></a>

					<a href="__MODULE__/Account/cash"></a>

				</div>

			</div>

			<p class="INputs">
			<input type="hidden" value="1">
				<a href="__MODULE__/Course/released/teaching/2" <if condition="$tn eq 1">class="moren"</if>>我想教</a>

				<a href="__MODULE__/Course/released/teaching/1" <if condition="$ln eq 1">class="moren""</if>>我想学</a>

			</p>

			<div class="perClass">

				<img src="__IMG__/images/permore_04.jpg"/>

				<ul>

					<li><a href="__MODULE__/Account/recharge">会员中心</a></li>

					<li><a href="__MODULE__/Album/showList/id/{$data.id}">相册</a></li>

					<li><a href="__MODULE__/Auth/add">身份认证</a></li>

					<li><a href="__MODULE__/Feedback/add">设置</a></li>

					<!--<li><a href="__MODULE__/UserMember/erweima_up/id/{$data.id}">二维码上传</a></li>-->

				</ul>

			</div>

			<img src="__IMG__/images/personLInk_02.jpg" class="Fix"/>

			<p class="LinkB">

				<!--老师-->

				<a href="{:U('UserMember/userList',array('teaching' =>2,'label'=>1))}" style="background:url(__IMG__/images/personLinkb_02.jpg) no-repeat;background-position-x:0px;"></a>

				<!--学生-->

				<a href="{:U('UserMember/userList',array('teaching' =>1,'label'=>1))}" style="background:url(__IMG__/images/personLinkb_02.jpg) no-repeat;background-position-x:-247px;"></a>

				<!--个人-->

				

				<a href="__MODULE__/UserMember/Index/index" style="background:url(__IMG__/images/personLinkb_02.jpg) no-repeat;background-position-x:-493px;opacity:1;position:relative;">

					<neq name="num" value="0"><span class="perNum" id="perNew" style="">{$num}</span></neq>

				</a>



			</p>

			<script type="text/javascript">

		    $('.table-tr').on('click',function(){

		        var id = $("input:hidden").val();

		        window.location.href='__MODULE__/UserMember/personal/id/'+id;

		    });

		    $('.button-class').on('click',function(){

		        window.location.href='__MODULE__/Message/ime';

		    });

		    $('#mi-course').on('click',function(){

		        window.location.href='__MODULE__/Mycourse/course';

		    });
		    $('.moren').click(function(){
			    	$tt = $(this).prev().val();
			    if($tt == 1){
			    	$.ajax({
			    		url: "{:U('ajaxTiaoz')}",
			    		data: {param1: 'value1'},
			    		success:function(data){
			    			if(false){  //hjl:默认是 data != 1
			    				layer.confirm('您需要先进行身份认证才能当老师', {
									  btn: ['去认证','取消'] //按钮
									}, function(){
									  	window.location.href="__MODULE__/Auth/add";
									}, function(){
									  // layer.msg('也可以这样', {
									  //   time: 20000, //20s后自动关闭
									  //   btn: ['明白了', '知道了']
									  });
			    				// layer.confirm(data,function(){
			    				// 	window.location.href="__MODULE__/Auth/add";
			    				// });
			    			}else{
			    				window.location.href="__MODULE__/Course/released/teaching/2";
			    			}
			    		}
			    	})
		    	}
		    });
			</script>

		</div>

	</body>

</block>
